import prisma from "@/src/db/db";
import { NextResponse } from "next/server";


export const GET = async () => {
  const [activeCount, inActiveCount] = await Promise.all([
    prisma.product.count({where: {isAvailableForPurchase: true}}),
    prisma.product.count({where: {isAvailableForPurchase: false}}),
    
  ])
  return NextResponse.json({
    activeCount,
    inActiveCount
  })
}